<!DOCTYPE html>
<html xmlns:th="www.thymeleaf.com"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
<head>
<meta charset="UTF-8" />
<title>ADD NEW ADMIN</title>
<link rel="stylesheet" href="../../css/bootstrap/bootstrap.css"
	th:href="@{/css/bootstrap/bootstrap.css}" />
<script src="../../js/jquery-1.11.2.js" th:src="@{/js/jquery-1.11.2.js}"></script>
<script src="../../js/admin.js" th:src="@{/js/admin.js}"></script>
<style>
@font-face {
	font-family: 'Glyphicons Halflings';
	src: url('../fonts/glyphicons-halflings-regular.eot');
	src: url('../fonts/glyphicons-halflings-regular.eot?#iefix')
		format('embedded-opentype'),
		url('../fonts/glyphicons-halflings-regular.woff') format('woff'),
		url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),
		url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular')
		format('svg');
}
</style>
</head>
<body>
	<header></header>
	<div th:include="layouts/menu :: menu"></div>
	<section>
		<article class="container col-sm-10 col-sm-offset-1">
			<div id="error"></div>
			<ol class="breadcrumb">
				<li><a th:href="@{/adminaccount/home}">Home</a></li>
				<li><a th:href="@{/restaurant/list}">Admin</a></li>
				<li class="active">Add</li>
			</ol>
			<div class="panel panel-success">
				<div class="panel-heading">CREATE NEW ADMIN</div>
				<div class="panel-body">
					<form id="addadmin" name="addadmin" method="post"
						th:action="@{/admin/add}" onsubmit="return validateForm();"
						class="form-horizontal container col-sm-10 col-sm-offset-1">
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminName">Admin
								Name:<span style="color: red">(*)</span></label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="adminName"
									name="adminName" placeholder="Enter admin name" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminEmail">Admin
								Email:<span style="color: red">(*)</span>
							</label>
							<div class="col-sm-9">
								<input type="email" class="form-control" id="adminEmail"
									name="adminEmail" placeholder="Enter admin email" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminLoginId">AdminLoginId:<span
								style="color: red">(*)</span></label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="adminLoginId"
									name="adminLoginId" placeholder="Enter adminloginid" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminPassword">Password:<span
								style="color: red">(*)</span></label>
							<div class="col-sm-9">
								<input type="password" class="form-control" id="adminPassword"
									name="adminPassword" placeholder="Enter Admin Password"/>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="phoneNumber">Phone
								Number</label>
							<div class="col-sm-9">
								<input type="text" class="form-control" id="phoneNumber"
									name="phoneNumber" placeHolder="Enter phone number" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminBirthday">Birthday:</label>
							<div class="col-sm-3">
								<input type="date" class="form-control" id="adminBirthday"
									name="adminBirthday" placeholder="Enter admin name" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="adminGender">Gender:</label>
							<div class="col-sm-3">
								<select class="form-control">
									<option value="-1">--Gender--</option>
									<option value="0">Male</option>
									<option value="1">Female</option>
								</select>
							</div>
							<label class="control-label col-sm-3" for="cityId">City:</label>
							<div class="col-sm-3">
								<select id="city" name="city" class="form-control"
									onchange="getDistrict();">
									<option value="0">--City--</option>
									<option th:each="ct : ${city.entrySet()}" th:value="${ct.key}"
										th:text="${ct.value}"></option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-sm-3" for="roleId">Role:<span
								style="color: red">(*)</span></label>
							<div class="col-sm-3">
								<select id="roleId" name="roleId" class="form-control">
									<option value="-1">--Role--</option>
									<option th:each="ro : ${role.entrySet()}" th:value="${ro.key}"
										th:text="${ro.value}"></option>
								</select>
							</div>
							<label class="control-label col-sm-3" for="district">District:</label>
							<div class="col-sm-3">
								<select id="district" name="district" class="form-control">
									<option value="0">--District--</option>

								</select>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-3 col-sm-2">
								<button type="button" onclick="backPage();"
									class="btn btn-primary glyphicon glyphicon-backward">Back</button>
							</div>
							<div class="col-sm-offset-1 col-sm-3 pull-right">
								<button type="submit"
									class="btn btn-primary glyphicon glyphicon-new-window">Create</button>
							</div>
						</div>
					</form>
				</div>
				<div class="panel-footer"></div>
			</div>
		</article>
	</section>
	<div th:include="layouts/footer :: footer"></div>
</body>
</html>